package com.sc.design.visitor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author sc
 * Created on  2017/12/7
 */
public class Client {
    public static void main(String[] args) {
        for(Employee employee:mock()){
            employee.accept(new Visitor());
        }
    }


    public static List<Employee> mock(){
        List<Employee>  list = new ArrayList<>();
        CommonEmployee sc = new CommonEmployee();
        sc.setJob("java");
        sc.setName("sc");
        sc.setSalary(1);
        sc.setGender(2);

        list.add(sc);

        ManagerEmployee pig = new ManagerEmployee();
        pig.setPerformance("管理");
        pig.setGender(1);
        pig.setName("ddd");
        list.add(pig);
        return list;
    }


}
